package com.itheima.mianx;

public class DeMo01 {
   private  String name;
   private  int age;

   public  void setName(String n) {name = n;}

    public String getName() {
        return name;
    }

    public void setAge(int a) {
        if(a>=0&&a<=120){
            age = a;
        }else{
            System.out.println("您的年龄不合理");
        }
    }

    public int getAge() {
        return age;
    }
}
